home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 2.1 KB | 83 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: BoundShp.h
- // Release Version: $ ODF 1 $
- //
- // Author: Henri Lamiraux
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef BOUNDSHP_H
- #define BOUNDSHP_H
-
- #ifndef CONSTANT_H
- #include "Constant.h"
- #endif
-
- #ifndef BASESHP_H
- #include "BaseShp.h"
- #endif
-
- // ----- OS Layer -----
-
- #ifndef FWPOINT_H
- #include "FWPoint.h"
- #endif
-
- #ifndef FWRECT_H
- #include "FWRect.h"
- #endif
-
- // ----- Foundation Layer -----
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- //========================================================================================
- // class CBoundedShape
- //========================================================================================
-
- class CBoundedShape : public CBaseShape
- {
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(CBoundedShape)
-
- public:
- virtual ~CBoundedShape();
-
- // ----- Geometry
- virtual void SetShapeGeometry(const FW_CPoint& anchorPoint, const FW_CPoint& currentPoint);
- virtual FW_CRect GetRectGeometry() const;
- void SetRectGeometry(const FW_CRect& bounds);
-
- // ----- Dragging
- virtual void OffsetShape(Environment *ev, FW_Fixed xDelta, FW_Fixed yDelta);
-
- // ----- Resize
- virtual void ResizeFeedback(FW_CGraphicContext& gc, const FW_CInk& ink, const FW_CStyle& style,
- short whichHandle, const FW_CPoint& mouseLoc);
- virtual void GetMapRects(short whichHandle, const FW_CPoint& lastLocation,
- FW_CRect& srcRect, FW_CRect& dstRect);
- virtual void GetHandleCenter(short whichHandle, FW_CPoint& center) const;
- virtual void MapShape(Environment *ev, CDrawPart* part, const FW_CRect& srcRect, const FW_CRect& dstRect);
-
- // ----- Persistence
- virtual void Flatten(FW_CWritableStream& archive);
-
- protected:
- CBoundedShape(unsigned short shapeType, unsigned short renderVerb);
- CBoundedShape(FW_CReadableStream& archive);
-
- private:
- virtual void OutlineShape(FW_CGraphicContext& gc, const FW_CInk& ink, const FW_CStyle& style, const FW_CRect& rect) = 0;
-
- private:
- FW_CRect fRect;
- };
-
- #endif
-